package com.rockwell.robot2015.test;

import org.opencv.core.Point;

import com.rockwell.robot2015.model.detectors.IDetector;

public class DummyTreasureDetector implements IDetector {

	boolean[] m_treasurePresent;
	double[] m_treasurePositionData;
	boolean[] m_detected;
	
	int m_treasurePresentIndex = 0;
	int m_treasurePositionIndex = 0;
	
	public DummyTreasureDetector(double[] treasurePositionData, boolean[] treasurePresent, boolean[] treasureDetected) {
		m_treasurePresent = treasurePresent;
		m_treasurePositionData = treasurePositionData;
		m_detected = treasureDetected;
	}
	@Override
	public boolean isPresent() {
		return m_treasurePresent[m_treasurePresentIndex++];
	}
	
	public boolean isDetected() {
		return m_detected[m_treasurePresentIndex++];
	}

	@Override
	public Point getDrift() {
		return new Point(m_treasurePositionData[m_treasurePositionIndex++], 0);
	}
	
	public int getWidth() {
		return (Integer) null;
	}

	@Override
	public Point getCenter() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void onDetect(boolean present, Point center, float radius,
			int length, int width) {
		// TODO Auto-generated method stub
		
	}

}
